package com.lry.config;

import com.lry.RegisterType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BrokerConfig {

    //同组broker名字相同，id不同
    private String brokerName = "default_broker";

    private Integer brokerId = 1;

    private String host = "localhost";

    private Integer port = 8084;

    private Integer topicQueueNum = 4;

    private String registerType = RegisterType.ZOOKEEPER;

    private String registerAddr = "localhost:2181";

    public BrokerConfig(Integer port) {
        this.port = port;
    }

    public BrokerConfig(String brokerName, Integer brokerId, Integer port) {
        this.brokerName = brokerName;
        this.brokerId = brokerId;
        this.port = port;
    }


}
